home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor2 / flags.doc < prev    next >
Text File  |  1995-03-31  |  1KB  |  38 lines

  1. (General) 
  2. Item: 893 by akcs.husty@hpcvbbs.cv.hp.com [Ali Persian Momeni] 
  3. Subj: USER FLAGS; WHY? 
  4. Date: 25 Sep 1992 
  5.  
  6. I know very well what the point of system flags is, but would someone 
  7. please tell me what good are user flags (1 th 64) and what you can do 
  8. with them?????? (I know that flags 1-5 appers on the status line when 
  9. set, but I don't know much else.) 
  10.  
  11. thanks, ali. 
  12.  
  13. ---------- 
  14. Resp: 1 of 1 by sanker@hpcvbbs.cv.hp.com [Greg Sanker] 
  15. Date: 25 Sep 1992 
  16.  
  17. User flags are just that: flags for the user to use as needed. For 
  18. instance, I could use flag 4 to remind me that I have to pick up 
  19. bread on the way home from work. (Like the old string around the 
  20. finger story). I set flag 4, and every time I see it, I remember 
  21. that I need to buy bread. When I stop at the store and pick up 
  22. bread, I clear flag 4. Now when I look at my HP 48, I'm not 
  23. reminded to pick up bread. 
  24.  
  25. The same can be true inside a program. If the program detects a 
  26. certain condition, a negative argument for instance, it sets a 
  27. flag. Later in the program, when it perhaps makes a difference 
  28. whether I had a positive or negative value, I test the flag. If it 
  29. is set, the number was negative, otherwise it was positive. 
  30.  
  31. There are many examples of how/why one could use flags. Think of 
  32. them as bi-state variables. The meaning (if any) assigned to a 
  33. given user flag is assigned by the user/programer. 
  34.  
  35. Hope this helps, 
  36.  
  37. Greg (SYSOP) 
  38.